<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改模拟实训')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-training-edit" th:object="${jxsxTraining}">
            <input name="trainingId" th:field="*{trainingId}" type="hidden">

            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">实训名称：</label>
                    <div class="col-sm-8">
                        <input name="trainingName" th:field="*{trainingName}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">实训性质：</label>
                    <div class="col-sm-8">
                        <input name="trainingNature" th:field="*{trainingNature}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">模拟类型：</label>
                    <div class="col-sm-8">
                        <select name="playType" class="form-control m-b" th:with="type=${@dict.getType('play_type')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{playType}"></option>
                        </select>
                    </div>
                </div>
            </div>


            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">模拟说明url：</label>
                    <div class="col-sm-8">
                        <input name="trainingDescUrl" th:field="*{trainingDescUrl}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">实训流程：</label>
                    <div class="col-sm-8">
                        <input name="processId" th:field="*{processId}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">发布时间：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <input name="publishTime" th:value="${#dates.format(jxsxTraining.publishTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">开始时间：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <input name="startTime" th:value="${#dates.format(jxsxTraining.startTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">结束时间：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <input name="endTime" th:value="${#dates.format(jxsxTraining.endTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">授课方式：</label>
                    <div class="col-sm-8">
                        <input name="teachingMode" th:field="*{teachingMode}" class="form-control" type="text">
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "jxsx/training";
        $("#form-training-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-training-edit').serialize());
            }
        }

        $("input[name='publishTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='startTime']").datetimepicker({
            format: "yyyy-mm-dd HH:ii:ss",
            autoclose: true
        });

        $("input[name='endTime']").datetimepicker({
            format: "yyyy-mm-dd HH:ii:ss",
            autoclose: true
        });
    </script>
</body>
</html>